package cn.pugle.oj.leetcode;

import cn.pugle.oj.catalog.DynamicProblem;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 错误写法, 没写完, 应该会超时
 *
 * @author tzp
 * @since 2020/9/21
 */
public class LC1039 implements DynamicProblem {
    public int minScoreTriangulation(int[] A) {
        if (A == null || A.length < 3) return 0;
        if (A.length == 3) return A[0] * A[1] * A[2];
        Map<List<Integer>, Integer> state = new HashMap<>();
        for (int edgeNum = 3; edgeNum <= A.length; edgeNum++) {//从三边形开始
            for (int first = 0; first <= A.length - edgeNum; first++) {//第一个点
                for (int second = first; second < A.length - edgeNum + 1; second++) {
                    for (int third = second; third < A.length - edgeNum + 2; third++) {
                        state.put(Arrays.asList(first, second, third), 1);
                    }
                }
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        System.out.println(new LC1039().minScoreTriangulation(new int[]{}));
    }
}
